home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 May
/
SGI IRIX 6.2 Applications 1996 May.iso
/
dist
/
impr_dev.idb
/
usr
/
impressario
/
src
/
models
/
laserjet_model.README.z
/
laserjet_model.README
Wrap
Text File
|
1996-05-06
|
6KB
|
135 lines
TITLE: README for template model file
=====================================
Purpose Of This README File:
----------------------------
This README file describes the conventions and tools used in the
template model file you see in this directory. The purpose of this
file is to point out some things which would be too long to explain in
a working shell file.
Model files are the interface between the spooling system and the
printer. Typically, a model file is a shell script which invokes a
number of programs to format and print files. The programs invoked by
a model file are called filters if they simply change the format of a
data file. Programs invoked by a model file are called drivers if
they send data to a printer and read and write to the POD Printer
Object Database files. In some cases a driver may perform filtering
in addition to its primary task of sending data to a printer.
When invoked, a model file requires a number of command line
parameters. In addition, a number of optional parameters may be
specified. This specification documents the syntax and function of
both the required and optional command line parameters for a standard
model file. Developers are free to add command line parameters to the
model file as long as they do not conflict with the options specified
in this document. All options must be lower-case only and should
allow specification both with and without a leading dash.
NOTE: For additional information, please see the Impressario
Programming Guide and the appropriate manual pages.
NOTE: The template_model file is a link to the laserjetpjl_model file.
The laserjetpjl_model is a working example of a full model file and as
such serves as a good example as well as a debugged template.
PostScript printer developers should also look at the
laserwriter_model file installed in ~lp/model with Impressario.
General Information:
--------------------
Also note that wherever you MUST change something for your printer,
you should find an "XXX". Search for them to see what you'll change.
Change the first line of the model file to '#!/bin/sh -x' for
debugging output. See the sh(1) man page for more information on
debugging Bourne Shell programs. Note that all model files must use
the Bourne Shell for Impressario compliance.
Comments And The DEVICE=, NAME=, TYPE=, GUI_CLASS= Fields:
----------------------------------------------------------
The printer administration tools use the DEVICE= field and NAME= field
to decide which printers to show in the install tool lists.
The list of supported devices in Impressario is
CENTRONICS, SERIAL, SCSI, NETPRINTER, REMOTE
Note that REMOTE should not be used by developer interfaces: it is
only for networked System VR3 printers and has special meanings to the
printer administration tools. Do not touch or modify the 'netface'
model file.
The following types are obsolete and should not be used:
TEK, VERSATEC
The TYPE= field is used by all tools which need to know the type of
printer.
The list of supported types in Impressario is:
Raster, ColorRaster, ColorPostScript, and MonoPostScript.
The following types are obsolete and should not be used:
Dumb, DumbColor, Plotter, and PostScript
The install tool inserts the chosen NAME= into the blank NAME= field
in the model file. It also replaces any OPTIONS= fields with the
values listed in the model file comments. The meaning of OPTIONS=
fields are printer specific.
The GUI_CLASS= must be set to the Xt class name of the graphical options
panel program that accompanies the model file. The following must all
match the string assigned to GUI_CLASS=:
1. The string assigned to GUI_CLASS in the printer model file.
2. The graphical option panel program Xt class name.
3. The string assigned to the GUI_CLASS define in the option
panel program file gui_class.h.
4. The name of the option panel app-defaults file in /usr/lib/X11/app-defaults.
It is important that the format of the commenting and NAME=, TYPE=
GUI_CLASS lines be left intact. They must be formatted as they are
in order to allow existing tools to parse and replace those fields.
See the template model file for details.
Variable Declaration Conventions:
---------------------------------
By convention, only those variables which are exported are in ALL
CAPS, while those local to the model file are in lower case. Be aware
that variable names in Bourne shell programs are case-sensitive.
IMPORTANT NOTE: Variable names that are in ALL CAPITAL LETTERS are
used by other programs to which you may not have access. DO NOT
CHANGE THESE VARIABLE NAMES! The ones that are exported are used by
filters in the fileconvert(1) CONVERT rules, and some are used by
install tools, but all are important.
Note that variables listed in ALL CAPS should be followed immediately
by an "export VARIABLE" so that the variable is added to the export
list of the Bourne Shell. This way all subsequent commands executed
from this shell or any subshell will have this variable set in their
environment.
Exitcode Conventions:
---------------------
Model files should exit with the following exit codes when these
errors are detected. Do not exit with an error code not on this list.
0 = no error
1 = an error of indeterminate nature (not listed below)
If you detect an error which is not in this list, exit with error
code 1. Do not exit with an error code not on this list.
2 = bad arguments.
NOTE: Do not exit with this error if the job could be printed.
Exit with this error only if the job could not be printed due to
the invalid arguments.
8 = unprintable or unreadable files